<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2EnvironmentOptions</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2EnvironmentOptions"></span><h1 class="cio">Interface ICoreWebView2EnvironmentOptions</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2EnvironmentOptions = interface(IUnknown)</code></p>
<h2 class="description">Description</h2>
<p>
 Options used to create WebView2 Environment. A default implementation is provided in WebView2EnvironmentOptions.h. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions</a>&quot;&gt;See the ICoreWebView2EnvironmentOptions article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="thisitem">ICoreWebView2EnvironmentOptions</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Get_AdditionalBrowserArguments-PWideChar-">Get_AdditionalBrowserArguments</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Set_AdditionalBrowserArguments-PWideChar-">Set_AdditionalBrowserArguments</a></strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Get_Language-PWideChar-">Get_Language</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Set_Language-PWideChar-">Set_Language</a></strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Get_TargetCompatibleBrowserVersion-PWideChar-">Get_TargetCompatibleBrowserVersion</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Set_TargetCompatibleBrowserVersion-PWideChar-">Set_TargetCompatibleBrowserVersion</a></strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Get_AllowSingleSignOnUsingOSPrimaryAccount-Integer-">Get_AllowSingleSignOnUsingOSPrimaryAccount</a></strong>(out allow: Integer): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2EnvironmentOptions.html#Set_AllowSingleSignOnUsingOSPrimaryAccount-Integer-">Set_AllowSingleSignOnUsingOSPrimaryAccount</a></strong>(allow: Integer): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_AdditionalBrowserArguments-PWideChar-"></span><code>function <strong>Get_AdditionalBrowserArguments</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Changes the behavior of the WebView. The arguments are passed to the browser process as part of the command. For more information about using command-line switches with Chromium browser processes, navigate to [Run Chromium with Flags](<a href="https://www.chromium.org/developers/how-tos/run-chromium-with-flags">https://www.chromium.org/developers/how-tos/run-chromium-with-flags</a>). The value appended to a switch is appended to the browser process, for example, in `&ndash;edge-webview-switches=xxx` the value is `xxx`. If you specify a switch that is important to WebView functionality, it is ignored, for example, `&ndash;user-data-dir`. Specific features are disabled internally and blocked from being enabled. If a switch is specified multiple times, only the last instance is used.

<p>\&gt; [!NOTE]\n\&gt; A merge of the different values of the same switch is not attempted, except for disabled and enabled features. The features specified by `&ndash;enable-features` and `&ndash;disable-features` are merged with simple logic.\n\&gt; * The features is the union of the specified features and built-in features. If a feature is disabled, it is removed from the enabled features list.

<p>If you specify command-line switches and use the `additionalBrowserArguments` parameter, the `&ndash;edge-webview-switches` value takes precedence and is processed last. If a switch fails to parse, the switch is ignored. The default state for the operation is to run the browser process with no extra flags.

<p>The caller must free the returned string with `CoTaskMemFree`. See [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{2FDE08A8-1E9A-4766-8C05-95A9CEB9D1C5}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_AdditionalBrowserArguments-PWideChar-"></span><code>function <strong>Set_AdditionalBrowserArguments</strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `AdditionalBrowserArguments` property.

<p>Please note that calling this API twice will replace the previous value rather than appending to it. If there are multiple switches, there should be a space in between them. The one exception is if multiple features are being enabled/disabled for a single switch, in which case the features should be comma-seperated. Ex. &quot;&ndash;disable-features=feature1,feature2 &ndash;some-other-switch &ndash;do-something&quot; </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_Language-PWideChar-"></span><code>function <strong>Get_Language</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The default display language for WebView. It applies to browser UI such as context menu and dialogs. It also applies to the `accept-languages` HTTP header that WebView sends to websites. The intended locale value is in the format of BCP 47 Language Tags. More information can be found from [IETF BCP47](<a href="https://www.ietf.org/rfc/bcp/bcp47.html">https://www.ietf.org/rfc/bcp/bcp47.html</a>).

<p>The caller must free the returned string with `CoTaskMemFree`. See [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_Language-PWideChar-"></span><code>function <strong>Set_Language</strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `Language` property. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_TargetCompatibleBrowserVersion-PWideChar-"></span><code>function <strong>Get_TargetCompatibleBrowserVersion</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Specifies the version of the WebView2 Runtime binaries required to be compatible with your app. This defaults to the WebView2 Runtime version that corresponds with the version of the SDK the app is using. The format of this value is the same as the format of the `BrowserVersionString` property and other `BrowserVersion` values. Only the version part of the `BrowserVersion` value is respected. The channel suffix, if it exists, is ignored. The version of the WebView2 Runtime binaries actually used may be different from the specified `TargetCompatibleBrowserVersion`. The binaries are only guaranteed to be compatible. Verify the actual version on the `BrowserVersionString` property on the `ICoreWebView2Environment`.

<p>The caller must free the returned string with `CoTaskMemFree`. See [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_TargetCompatibleBrowserVersion-PWideChar-"></span><code>function <strong>Set_TargetCompatibleBrowserVersion</strong>(value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `TargetCompatibleBrowserVersion` property. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_AllowSingleSignOnUsingOSPrimaryAccount-Integer-"></span><code>function <strong>Get_AllowSingleSignOnUsingOSPrimaryAccount</strong>(out allow: Integer): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The `AllowSingleSignOnUsingOSPrimaryAccount` property is used to enable single sign on with Azure Active Directory (AAD) and personal Microsoft Account (MSA) resources inside WebView. All AAD accounts, connected to Windows and shared for all apps, are supported. For MSA, SSO is only enabled for the account associated for Windows account login, if any. Default is disabled. Universal Windows Platform apps must also declare `enterpriseCloudSSO` [Restricted capabilities](/windows/uwp/packaging/app-capability-declarations\#restricted-capabilities) for the single sign on (SSO) to work. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_AllowSingleSignOnUsingOSPrimaryAccount-Integer-"></span><code>function <strong>Set_AllowSingleSignOnUsingOSPrimaryAccount</strong>(allow: Integer): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `AllowSingleSignOnUsingOSPrimaryAccount` property. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
